EMT Practice Test

1. Question Content...


Question List

Question1: Select the valid fun () invocations: (Select two answers)

Question2: What is the expected output of the following snippet?

Question3: Executing the following snippet

will cause the dct:

Question4: A class constructor (Select two answers)

Question5: Assuming that 1st is a four-element list is there any difference between these two statements?

Question6: What is the expected output of the following snippet?

Question7: Which of the following literals reflect the value given as 34.23? (Select two answers)

Question8: What is the expected output of the following code?

Question9: What is the expected output of the following snippet?

Question10: You are going to read just one character from a stream called s.
Which statement would you use?

Question11: Which line can be used instead of the comment to cause the snippet to produce the following expected output? (Select two answers)
Expected output:
1 2 3
Code:

Question12: How many lines does the following snippet output?

Question13: What is the expected behavior of the following code?

It will

Question14: If S is a stream open for reading, what do you expect from the following invocation?

Question15: How many elements will the list1 list contain after execution of the following snippet?

Question16: How many stars (*) does the following snippet print?

Question17: Can a module run like regular code?

Question18: Python strings can be "glued" together using the operator:

Question19: The following expression

is:

Question20: Which of the following words can be used as a variable name? (Select two valid names)

Question21: Is it possible to safely check if a class/object has a certain attribute?

Question22: What is the expected output of the following code?

Question23: Assuming that the following snippet has been successfully executed, which of the equations are False? (Select two answers)

Question24: Which of the following sentences are true? (Select two answers)

Question25: A compiler is a program designed to (Select two answers)

Question26: Files with the suffix .pyc contain: